package collections;

import lombok.Data;

import java.util.HashSet;
import java.util.Set;

@Data
public class HashSetTest1 {

    String name;

    public static void main(String[] args) {
        Set<HashSetTest1> s = new HashSet<>();
        HashSetTest1 o1 = new HashSetTest1();
        o1.name = "haha";
        HashSetTest1 o2 = new HashSetTest1();
        o1.name = "hehe";
        System.out.println(s.add(o1));
        System.out.println(s.add(o2));
        System.out.println(s);
    }


    @Override
    public int hashCode() {
        return 1;
    }

    @Override
    public boolean equals(Object obj) {
        return true;
    }
}
